using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VCODEP
    {
        public DataRow Convert2CODEP(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryCODEP(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["CODMANDANT"] = " ".PadRight(2 ); 
         dwReturn["CODKTOKL"] = " ".PadRight(6 ); 
         dwReturn["CODWAKZ"] = " ".PadRight(1 ); 
         dwReturn["CODZS"] = " ".PadRight(2 ); 
         dwReturn["CODPROGRP"] = " ".PadRight(3 ); 
         dwReturn["CODARTGRP"] = " ".PadRight(3 ); 
         dwReturn["CODSFKZ"] = " ".PadRight(1 ); 
         dwReturn["CODFARBKZ"] = " ".PadRight(1 ); 
         dwReturn["CODDESSKZ"] = " ".PadRight(1 ); 
         dwReturn["CODBESCHKZ"] = " ".PadRight(1 ); 
         dwReturn["CODAENZL"] = " ".PadRight(0 ); 
         dwReturn["CODAENB"] = " ".PadRight(8 ); 
         dwReturn["CODAEND"] = " ".PadRight(0 ); 
         dwReturn["CODNEUB"] = " ".PadRight(8 ); 
         dwReturn["CODNEUD"] = " ".PadRight(0 ); 
         dwReturn["CODABSCHREI"] = " ".PadRight(0 ); 
         dwReturn["CODSPALTE"] = " ".PadRight(1 ); 
         dwReturn["CODAMONAT1"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ1"] = " ".PadRight(0 ); 
         dwReturn["CODAZS1"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT2"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ2"] = " ".PadRight(0 ); 
         dwReturn["CODAZS2"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT3"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ3"] = " ".PadRight(0 ); 
         dwReturn["CODAZS3"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT4"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ4"] = " ".PadRight(0 ); 
         dwReturn["CODAZS4"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT5"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ5"] = " ".PadRight(0 ); 
         dwReturn["CODAZS5"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT6"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ6"] = " ".PadRight(0 ); 
         dwReturn["CODAZS6"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT7"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ7"] = " ".PadRight(0 ); 
         dwReturn["CODAZS7"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT8"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ8"] = " ".PadRight(0 ); 
         dwReturn["CODAZS8"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT9"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ9"] = " ".PadRight(0 ); 
         dwReturn["CODAZS9"] = " ".PadRight(2 ); 
         dwReturn["CODAMONAT10"] = " ".PadRight(0 ); 
         dwReturn["CODAPROZ10"] = " ".PadRight(0 ); 
         dwReturn["CODAZS10"] = " ".PadRight(2 ); 
         dwReturn["CODRWMONAT1"] = " ".PadRight(0 ); 
         dwReturn["CODRWPROZ1"] = " ".PadRight(0 ); 
         dwReturn["CODRWZS1"] = " ".PadRight(2 ); 
         dwReturn["CODRWMONAT2"] = " ".PadRight(0 ); 
         dwReturn["CODRWPROZ2"] = " ".PadRight(0 ); 
         dwReturn["CODRWZS2"] = " ".PadRight(2 ); 
         dwReturn["CODRWMONAT3"] = " ".PadRight(0 ); 
         dwReturn["CODRWPROZ3"] = " ".PadRight(0 ); 
         dwReturn["CODRWZS3"] = " ".PadRight(2 ); 
         dwReturn["CODRWMONAT4"] = " ".PadRight(0 ); 
         dwReturn["CODRWPROZ4"] = " ".PadRight(0 ); 
         dwReturn["CODRWZS4"] = " ".PadRight(2 ); 
         dwReturn["CODRWMONAT5"] = " ".PadRight(0 ); 
         dwReturn["CODRWPROZ5"] = " ".PadRight(0 ); 
         dwReturn["CODRWZS5"] = " ".PadRight(2 ); 
         dwReturn["CODRWMONAT6"] = " ".PadRight(0 ); 
         dwReturn["CODRWPROZ6"] = " ".PadRight(0 ); 
         dwReturn["CODRWZS6"] = " ".PadRight(2 ); 
         dwReturn["CODRWMONAT7"] = " ".PadRight(0 ); 
         dwReturn["CODRWPROZ7"] = " ".PadRight(0 ); 
         dwReturn["CODRWZS7"] = " ".PadRight(2 ); 
         dwReturn["CODRWMONAT8"] = " ".PadRight(0 ); 
         dwReturn["CODRWPROZ8"] = " ".PadRight(0 ); 
         dwReturn["CODRWZS8"] = " ".PadRight(2 ); 
         dwReturn["CODMINDALT"] = " ".PadRight(0 ); 
         dwReturn["CODZEITRAUM"] = " ".PadRight(0 ); 
         dwReturn["CODMINME"] = " ".PadRight(0 ); 
         dwReturn["CODMINMEPRO"] = " ".PadRight(0 ); 
         dwReturn["CODMINMEZS"] = " ".PadRight(2 ); 
         dwReturn["CODMINMEALT"] = " ".PadRight(0 ); 
         dwReturn["CODKOLLPROZ"] = " ".PadRight(0 ); 
         dwReturn["CODKOLLZS"] = " ".PadRight(2 ); 
         dwReturn["CODABVKPROZ"] = " ".PadRight(0 ); 
         dwReturn["CODABVKZS"] = " ".PadRight(2 ); 
         dwReturn["CODMUSTPROZ"] = " ".PadRight(0 ); 
         dwReturn["CODMUSTZS"] = " ".PadRight(2 ); 
         dwReturn["CODVERSPROZ"] = " ".PadRight(0 ); 
         dwReturn["CODVERSZS"] = " ".PadRight(2 ); 
         dwReturn["CODRESTPROZ"] = " ".PadRight(0 ); 
         dwReturn["CODRESTZS"] = " ".PadRight(2 ); 
         dwReturn["CODLB1"] = " ".PadRight(2 ); 
         dwReturn["CODLB2"] = " ".PadRight(2 ); 
         dwReturn["CODLB3"] = " ".PadRight(2 ); 
         dwReturn["CODLB4"] = " ".PadRight(2 ); 
         dwReturn["CODLB5"] = " ".PadRight(2 ); 
         dwReturn["CODLB6"] = " ".PadRight(2 ); 
         dwReturn["CODLBPROZ"] = " ".PadRight(0 ); 
         dwReturn["CODLBZS"] = " ".PadRight(2 ); 
         dwReturn["CODMEINST"] = " ".PadRight(4 ); 
         dwReturn["CODMEINSTZ"] = " ".PadRight(4 ); 
         dwReturn["CODMBEWPR1"] = " ".PadRight(1 ); 
         dwReturn["CODMBEWPR2"] = " ".PadRight(1 ); 
         dwReturn["CODMBEWPR3"] = " ".PadRight(1 ); 
         dwReturn["CODMBEWPR4"] = " ".PadRight(1 ); 
         dwReturn["CODMBEWPR5"] = " ".PadRight(1 ); 
         dwReturn["CODINVBEWPR"] = " ".PadRight(1 ); 
         dwReturn["CODINVPRART"] = " ".PadRight(5 ); 
         dwReturn["CODEKPREIS"] = " ".PadRight(1 ); 
         dwReturn["CODEKPREISA"] = " ".PadRight(5 ); 
         dwReturn["CODKALKZW"] = " ".PadRight(5 ); 
         dwReturn["CODKALKVS"] = " ".PadRight(1 ); 
         dwReturn["CODSPALTE2"] = " ".PadRight(0 ); 
         dwReturn["CODSPALTE3"] = " ".PadRight(0 ); 
         dwReturn["CODSPALTE4"] = " ".PadRight(0 ); 
         dwReturn["CODMINMO"] = " ".PadRight(0 ); 
         dwReturn["CODFRBKZ"] = " ".PadRight(1 ); 
         dwReturn["CODAMKZ"] = " ".PadRight(1 ); 
         dwReturn["CODAUFWKZ"] = " ".PadRight(1 ); 
         dwReturn["CODKUMUKZ"] = " ".PadRight(1 ); 
         dwReturn["CODHKKZ"] = " ".PadRight(1 ); 
         dwReturn["CODTWKZ"] = " ".PadRight(1 ); 
         dwReturn["CODNTOKZ"] = " ".PadRight(1 ); 
         dwReturn["CODCOMMENT1"] = " ".PadRight(70 ); 
         dwReturn["CODCOMMENT2"] = " ".PadRight(70 ); 
         dwReturn["CODFILLER"] = " ".PadRight(106 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapCODEP(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveCODEP(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryCODEP(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapCODEP(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertCODEP(dwLocal, ITXDBVERSION);
            }
            UpdateCODEP(dwLocal);
        }
        public void InsertCODEP(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO CODEP(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryCODEP(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM CODEP WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM CODEP  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "CODEP";
            Return = Result;
            return Return;
        }
        public void DeleteCODEP(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM CODEP   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateCODEP(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE CODEP SET "
                    +"CODMANDANT= :CODMANDANT,"
                    +"CODKTOKL= :CODKTOKL,"
                    +"CODWAKZ= :CODWAKZ,"
                    +"CODZS= :CODZS,"
                    +"CODPROGRP= :CODPROGRP,"
                    +"CODARTGRP= :CODARTGRP,"
                    +"CODSFKZ= :CODSFKZ,"
                    +"CODFARBKZ= :CODFARBKZ,"
                    +"CODDESSKZ= :CODDESSKZ,"
                    +"CODBESCHKZ= :CODBESCHKZ,"
                    +"CODAENZL= :CODAENZL,"
                    +"CODAENB= :CODAENB,"
                    +"CODAEND= :CODAEND,"
                    +"CODNEUB= :CODNEUB,"
                    +"CODNEUD= :CODNEUD,"
                    +"CODABSCHREI= :CODABSCHREI,"
                    +"CODSPALTE= :CODSPALTE,"
                    +"CODAMONAT1= :CODAMONAT1,"
                    +"CODAPROZ1= :CODAPROZ1,"
                    +"CODAZS1= :CODAZS1,"
                    +"CODAMONAT2= :CODAMONAT2,"
                    +"CODAPROZ2= :CODAPROZ2,"
                    +"CODAZS2= :CODAZS2,"
                    +"CODAMONAT3= :CODAMONAT3,"
                    +"CODAPROZ3= :CODAPROZ3,"
                    +"CODAZS3= :CODAZS3,"
                    +"CODAMONAT4= :CODAMONAT4,"
                    +"CODAPROZ4= :CODAPROZ4,"
                    +"CODAZS4= :CODAZS4,"
                    +"CODAMONAT5= :CODAMONAT5,"
                    +"CODAPROZ5= :CODAPROZ5,"
                    +"CODAZS5= :CODAZS5,"
                    +"CODAMONAT6= :CODAMONAT6,"
                    +"CODAPROZ6= :CODAPROZ6,"
                    +"CODAZS6= :CODAZS6,"
                    +"CODAMONAT7= :CODAMONAT7,"
                    +"CODAPROZ7= :CODAPROZ7,"
                    +"CODAZS7= :CODAZS7,"
                    +"CODAMONAT8= :CODAMONAT8,"
                    +"CODAPROZ8= :CODAPROZ8,"
                    +"CODAZS8= :CODAZS8,"
                    +"CODAMONAT9= :CODAMONAT9,"
                    +"CODAPROZ9= :CODAPROZ9,"
                    +"CODAZS9= :CODAZS9,"
                    +"CODAMONAT10= :CODAMONAT10,"
                    +"CODAPROZ10= :CODAPROZ10,"
                    +"CODAZS10= :CODAZS10,"
                    +"CODRWMONAT1= :CODRWMONAT1,"
                    +"CODRWPROZ1= :CODRWPROZ1,"
                    +"CODRWZS1= :CODRWZS1,"
                    +"CODRWMONAT2= :CODRWMONAT2,"
                    +"CODRWPROZ2= :CODRWPROZ2,"
                    +"CODRWZS2= :CODRWZS2,"
                    +"CODRWMONAT3= :CODRWMONAT3,"
                    +"CODRWPROZ3= :CODRWPROZ3,"
                    +"CODRWZS3= :CODRWZS3,"
                    +"CODRWMONAT4= :CODRWMONAT4,"
                    +"CODRWPROZ4= :CODRWPROZ4,"
                    +"CODRWZS4= :CODRWZS4,"
                    +"CODRWMONAT5= :CODRWMONAT5,"
                    +"CODRWPROZ5= :CODRWPROZ5,"
                    +"CODRWZS5= :CODRWZS5,"
                    +"CODRWMONAT6= :CODRWMONAT6,"
                    +"CODRWPROZ6= :CODRWPROZ6,"
                    +"CODRWZS6= :CODRWZS6,"
                    +"CODRWMONAT7= :CODRWMONAT7,"
                    +"CODRWPROZ7= :CODRWPROZ7,"
                    +"CODRWZS7= :CODRWZS7,"
                    +"CODRWMONAT8= :CODRWMONAT8,"
                    +"CODRWPROZ8= :CODRWPROZ8,"
                    +"CODRWZS8= :CODRWZS8,"
                    +"CODMINDALT= :CODMINDALT,"
                    +"CODZEITRAUM= :CODZEITRAUM,"
                    +"CODMINME= :CODMINME,"
                    +"CODMINMEPRO= :CODMINMEPRO,"
                    +"CODMINMEZS= :CODMINMEZS,"
                    +"CODMINMEALT= :CODMINMEALT,"
                    +"CODKOLLPROZ= :CODKOLLPROZ,"
                    +"CODKOLLZS= :CODKOLLZS,"
                    +"CODABVKPROZ= :CODABVKPROZ,"
                    +"CODABVKZS= :CODABVKZS,"
                    +"CODMUSTPROZ= :CODMUSTPROZ,"
                    +"CODMUSTZS= :CODMUSTZS,"
                    +"CODVERSPROZ= :CODVERSPROZ,"
                    +"CODVERSZS= :CODVERSZS,"
                    +"CODRESTPROZ= :CODRESTPROZ,"
                    +"CODRESTZS= :CODRESTZS,"
                    +"CODLB1= :CODLB1,"
                    +"CODLB2= :CODLB2,"
                    +"CODLB3= :CODLB3,"
                    +"CODLB4= :CODLB4,"
                    +"CODLB5= :CODLB5,"
                    +"CODLB6= :CODLB6,"
                    +"CODLBPROZ= :CODLBPROZ,"
                    +"CODLBZS= :CODLBZS,"
                    +"CODMEINST= :CODMEINST,"
                    +"CODMEINSTZ= :CODMEINSTZ,"
                    +"CODMBEWPR1= :CODMBEWPR1,"
                    +"CODMBEWPR2= :CODMBEWPR2,"
                    +"CODMBEWPR3= :CODMBEWPR3,"
                    +"CODMBEWPR4= :CODMBEWPR4,"
                    +"CODMBEWPR5= :CODMBEWPR5,"
                    +"CODINVBEWPR= :CODINVBEWPR,"
                    +"CODINVPRART= :CODINVPRART,"
                    +"CODEKPREIS= :CODEKPREIS,"
                    +"CODEKPREISA= :CODEKPREISA,"
                    +"CODKALKZW= :CODKALKZW,"
                    +"CODKALKVS= :CODKALKVS,"
                    +"CODSPALTE2= :CODSPALTE2,"
                    +"CODSPALTE3= :CODSPALTE3,"
                    +"CODSPALTE4= :CODSPALTE4,"
                    +"CODMINMO= :CODMINMO,"
                    +"CODFRBKZ= :CODFRBKZ,"
                    +"CODAMKZ= :CODAMKZ,"
                    +"CODAUFWKZ= :CODAUFWKZ,"
                    +"CODKUMUKZ= :CODKUMUKZ,"
                    +"CODHKKZ= :CODHKKZ,"
                    +"CODTWKZ= :CODTWKZ,"
                    +"CODNTOKZ= :CODNTOKZ,"
                    +"CODCOMMENT1= :CODCOMMENT1,"
                    +"CODCOMMENT2= :CODCOMMENT2,"
                    +"CODFILLER= :CODFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("CODMANDANT", OracleType.NVarChar).Value = dwData["CODMANDANT"].ToString(); 
          or1.Parameters.Add("CODKTOKL", OracleType.NVarChar).Value = dwData["CODKTOKL"].ToString(); 
          or1.Parameters.Add("CODWAKZ", OracleType.NVarChar).Value = dwData["CODWAKZ"].ToString(); 
          or1.Parameters.Add("CODZS", OracleType.NVarChar).Value = dwData["CODZS"].ToString(); 
          or1.Parameters.Add("CODPROGRP", OracleType.NVarChar).Value = dwData["CODPROGRP"].ToString(); 
          or1.Parameters.Add("CODARTGRP", OracleType.NVarChar).Value = dwData["CODARTGRP"].ToString(); 
          or1.Parameters.Add("CODSFKZ", OracleType.NVarChar).Value = dwData["CODSFKZ"].ToString(); 
          or1.Parameters.Add("CODFARBKZ", OracleType.NVarChar).Value = dwData["CODFARBKZ"].ToString(); 
          or1.Parameters.Add("CODDESSKZ", OracleType.NVarChar).Value = dwData["CODDESSKZ"].ToString(); 
          or1.Parameters.Add("CODBESCHKZ", OracleType.NVarChar).Value = dwData["CODBESCHKZ"].ToString(); 
          or1.Parameters.Add("CODAENZL", OracleType.NVarChar).Value = dwData["CODAENZL"].ToString(); 
          or1.Parameters.Add("CODAENB", OracleType.NVarChar).Value = dwData["CODAENB"].ToString(); 
          or1.Parameters.Add("CODAEND", OracleType.NVarChar).Value = dwData["CODAEND"].ToString(); 
          or1.Parameters.Add("CODNEUB", OracleType.NVarChar).Value = dwData["CODNEUB"].ToString(); 
          or1.Parameters.Add("CODNEUD", OracleType.NVarChar).Value = dwData["CODNEUD"].ToString(); 
          or1.Parameters.Add("CODABSCHREI", OracleType.NVarChar).Value = dwData["CODABSCHREI"].ToString(); 
          or1.Parameters.Add("CODSPALTE", OracleType.NVarChar).Value = dwData["CODSPALTE"].ToString(); 
          or1.Parameters.Add("CODAMONAT1", OracleType.NVarChar).Value = dwData["CODAMONAT1"].ToString(); 
          or1.Parameters.Add("CODAPROZ1", OracleType.NVarChar).Value = dwData["CODAPROZ1"].ToString(); 
          or1.Parameters.Add("CODAZS1", OracleType.NVarChar).Value = dwData["CODAZS1"].ToString(); 
          or1.Parameters.Add("CODAMONAT2", OracleType.NVarChar).Value = dwData["CODAMONAT2"].ToString(); 
          or1.Parameters.Add("CODAPROZ2", OracleType.NVarChar).Value = dwData["CODAPROZ2"].ToString(); 
          or1.Parameters.Add("CODAZS2", OracleType.NVarChar).Value = dwData["CODAZS2"].ToString(); 
          or1.Parameters.Add("CODAMONAT3", OracleType.NVarChar).Value = dwData["CODAMONAT3"].ToString(); 
          or1.Parameters.Add("CODAPROZ3", OracleType.NVarChar).Value = dwData["CODAPROZ3"].ToString(); 
          or1.Parameters.Add("CODAZS3", OracleType.NVarChar).Value = dwData["CODAZS3"].ToString(); 
          or1.Parameters.Add("CODAMONAT4", OracleType.NVarChar).Value = dwData["CODAMONAT4"].ToString(); 
          or1.Parameters.Add("CODAPROZ4", OracleType.NVarChar).Value = dwData["CODAPROZ4"].ToString(); 
          or1.Parameters.Add("CODAZS4", OracleType.NVarChar).Value = dwData["CODAZS4"].ToString(); 
          or1.Parameters.Add("CODAMONAT5", OracleType.NVarChar).Value = dwData["CODAMONAT5"].ToString(); 
          or1.Parameters.Add("CODAPROZ5", OracleType.NVarChar).Value = dwData["CODAPROZ5"].ToString(); 
          or1.Parameters.Add("CODAZS5", OracleType.NVarChar).Value = dwData["CODAZS5"].ToString(); 
          or1.Parameters.Add("CODAMONAT6", OracleType.NVarChar).Value = dwData["CODAMONAT6"].ToString(); 
          or1.Parameters.Add("CODAPROZ6", OracleType.NVarChar).Value = dwData["CODAPROZ6"].ToString(); 
          or1.Parameters.Add("CODAZS6", OracleType.NVarChar).Value = dwData["CODAZS6"].ToString(); 
          or1.Parameters.Add("CODAMONAT7", OracleType.NVarChar).Value = dwData["CODAMONAT7"].ToString(); 
          or1.Parameters.Add("CODAPROZ7", OracleType.NVarChar).Value = dwData["CODAPROZ7"].ToString(); 
          or1.Parameters.Add("CODAZS7", OracleType.NVarChar).Value = dwData["CODAZS7"].ToString(); 
          or1.Parameters.Add("CODAMONAT8", OracleType.NVarChar).Value = dwData["CODAMONAT8"].ToString(); 
          or1.Parameters.Add("CODAPROZ8", OracleType.NVarChar).Value = dwData["CODAPROZ8"].ToString(); 
          or1.Parameters.Add("CODAZS8", OracleType.NVarChar).Value = dwData["CODAZS8"].ToString(); 
          or1.Parameters.Add("CODAMONAT9", OracleType.NVarChar).Value = dwData["CODAMONAT9"].ToString(); 
          or1.Parameters.Add("CODAPROZ9", OracleType.NVarChar).Value = dwData["CODAPROZ9"].ToString(); 
          or1.Parameters.Add("CODAZS9", OracleType.NVarChar).Value = dwData["CODAZS9"].ToString(); 
          or1.Parameters.Add("CODAMONAT10", OracleType.NVarChar).Value = dwData["CODAMONAT10"].ToString(); 
          or1.Parameters.Add("CODAPROZ10", OracleType.NVarChar).Value = dwData["CODAPROZ10"].ToString(); 
          or1.Parameters.Add("CODAZS10", OracleType.NVarChar).Value = dwData["CODAZS10"].ToString(); 
          or1.Parameters.Add("CODRWMONAT1", OracleType.NVarChar).Value = dwData["CODRWMONAT1"].ToString(); 
          or1.Parameters.Add("CODRWPROZ1", OracleType.NVarChar).Value = dwData["CODRWPROZ1"].ToString(); 
          or1.Parameters.Add("CODRWZS1", OracleType.NVarChar).Value = dwData["CODRWZS1"].ToString(); 
          or1.Parameters.Add("CODRWMONAT2", OracleType.NVarChar).Value = dwData["CODRWMONAT2"].ToString(); 
          or1.Parameters.Add("CODRWPROZ2", OracleType.NVarChar).Value = dwData["CODRWPROZ2"].ToString(); 
          or1.Parameters.Add("CODRWZS2", OracleType.NVarChar).Value = dwData["CODRWZS2"].ToString(); 
          or1.Parameters.Add("CODRWMONAT3", OracleType.NVarChar).Value = dwData["CODRWMONAT3"].ToString(); 
          or1.Parameters.Add("CODRWPROZ3", OracleType.NVarChar).Value = dwData["CODRWPROZ3"].ToString(); 
          or1.Parameters.Add("CODRWZS3", OracleType.NVarChar).Value = dwData["CODRWZS3"].ToString(); 
          or1.Parameters.Add("CODRWMONAT4", OracleType.NVarChar).Value = dwData["CODRWMONAT4"].ToString(); 
          or1.Parameters.Add("CODRWPROZ4", OracleType.NVarChar).Value = dwData["CODRWPROZ4"].ToString(); 
          or1.Parameters.Add("CODRWZS4", OracleType.NVarChar).Value = dwData["CODRWZS4"].ToString(); 
          or1.Parameters.Add("CODRWMONAT5", OracleType.NVarChar).Value = dwData["CODRWMONAT5"].ToString(); 
          or1.Parameters.Add("CODRWPROZ5", OracleType.NVarChar).Value = dwData["CODRWPROZ5"].ToString(); 
          or1.Parameters.Add("CODRWZS5", OracleType.NVarChar).Value = dwData["CODRWZS5"].ToString(); 
          or1.Parameters.Add("CODRWMONAT6", OracleType.NVarChar).Value = dwData["CODRWMONAT6"].ToString(); 
          or1.Parameters.Add("CODRWPROZ6", OracleType.NVarChar).Value = dwData["CODRWPROZ6"].ToString(); 
          or1.Parameters.Add("CODRWZS6", OracleType.NVarChar).Value = dwData["CODRWZS6"].ToString(); 
          or1.Parameters.Add("CODRWMONAT7", OracleType.NVarChar).Value = dwData["CODRWMONAT7"].ToString(); 
          or1.Parameters.Add("CODRWPROZ7", OracleType.NVarChar).Value = dwData["CODRWPROZ7"].ToString(); 
          or1.Parameters.Add("CODRWZS7", OracleType.NVarChar).Value = dwData["CODRWZS7"].ToString(); 
          or1.Parameters.Add("CODRWMONAT8", OracleType.NVarChar).Value = dwData["CODRWMONAT8"].ToString(); 
          or1.Parameters.Add("CODRWPROZ8", OracleType.NVarChar).Value = dwData["CODRWPROZ8"].ToString(); 
          or1.Parameters.Add("CODRWZS8", OracleType.NVarChar).Value = dwData["CODRWZS8"].ToString(); 
          or1.Parameters.Add("CODMINDALT", OracleType.NVarChar).Value = dwData["CODMINDALT"].ToString(); 
          or1.Parameters.Add("CODZEITRAUM", OracleType.NVarChar).Value = dwData["CODZEITRAUM"].ToString(); 
          or1.Parameters.Add("CODMINME", OracleType.NVarChar).Value = dwData["CODMINME"].ToString(); 
          or1.Parameters.Add("CODMINMEPRO", OracleType.NVarChar).Value = dwData["CODMINMEPRO"].ToString(); 
          or1.Parameters.Add("CODMINMEZS", OracleType.NVarChar).Value = dwData["CODMINMEZS"].ToString(); 
          or1.Parameters.Add("CODMINMEALT", OracleType.NVarChar).Value = dwData["CODMINMEALT"].ToString(); 
          or1.Parameters.Add("CODKOLLPROZ", OracleType.NVarChar).Value = dwData["CODKOLLPROZ"].ToString(); 
          or1.Parameters.Add("CODKOLLZS", OracleType.NVarChar).Value = dwData["CODKOLLZS"].ToString(); 
          or1.Parameters.Add("CODABVKPROZ", OracleType.NVarChar).Value = dwData["CODABVKPROZ"].ToString(); 
          or1.Parameters.Add("CODABVKZS", OracleType.NVarChar).Value = dwData["CODABVKZS"].ToString(); 
          or1.Parameters.Add("CODMUSTPROZ", OracleType.NVarChar).Value = dwData["CODMUSTPROZ"].ToString(); 
          or1.Parameters.Add("CODMUSTZS", OracleType.NVarChar).Value = dwData["CODMUSTZS"].ToString(); 
          or1.Parameters.Add("CODVERSPROZ", OracleType.NVarChar).Value = dwData["CODVERSPROZ"].ToString(); 
          or1.Parameters.Add("CODVERSZS", OracleType.NVarChar).Value = dwData["CODVERSZS"].ToString(); 
          or1.Parameters.Add("CODRESTPROZ", OracleType.NVarChar).Value = dwData["CODRESTPROZ"].ToString(); 
          or1.Parameters.Add("CODRESTZS", OracleType.NVarChar).Value = dwData["CODRESTZS"].ToString(); 
          or1.Parameters.Add("CODLB1", OracleType.NVarChar).Value = dwData["CODLB1"].ToString(); 
          or1.Parameters.Add("CODLB2", OracleType.NVarChar).Value = dwData["CODLB2"].ToString(); 
          or1.Parameters.Add("CODLB3", OracleType.NVarChar).Value = dwData["CODLB3"].ToString(); 
          or1.Parameters.Add("CODLB4", OracleType.NVarChar).Value = dwData["CODLB4"].ToString(); 
          or1.Parameters.Add("CODLB5", OracleType.NVarChar).Value = dwData["CODLB5"].ToString(); 
          or1.Parameters.Add("CODLB6", OracleType.NVarChar).Value = dwData["CODLB6"].ToString(); 
          or1.Parameters.Add("CODLBPROZ", OracleType.NVarChar).Value = dwData["CODLBPROZ"].ToString(); 
          or1.Parameters.Add("CODLBZS", OracleType.NVarChar).Value = dwData["CODLBZS"].ToString(); 
          or1.Parameters.Add("CODMEINST", OracleType.NVarChar).Value = dwData["CODMEINST"].ToString(); 
          or1.Parameters.Add("CODMEINSTZ", OracleType.NVarChar).Value = dwData["CODMEINSTZ"].ToString(); 
          or1.Parameters.Add("CODMBEWPR1", OracleType.NVarChar).Value = dwData["CODMBEWPR1"].ToString(); 
          or1.Parameters.Add("CODMBEWPR2", OracleType.NVarChar).Value = dwData["CODMBEWPR2"].ToString(); 
          or1.Parameters.Add("CODMBEWPR3", OracleType.NVarChar).Value = dwData["CODMBEWPR3"].ToString(); 
          or1.Parameters.Add("CODMBEWPR4", OracleType.NVarChar).Value = dwData["CODMBEWPR4"].ToString(); 
          or1.Parameters.Add("CODMBEWPR5", OracleType.NVarChar).Value = dwData["CODMBEWPR5"].ToString(); 
          or1.Parameters.Add("CODINVBEWPR", OracleType.NVarChar).Value = dwData["CODINVBEWPR"].ToString(); 
          or1.Parameters.Add("CODINVPRART", OracleType.NVarChar).Value = dwData["CODINVPRART"].ToString(); 
          or1.Parameters.Add("CODEKPREIS", OracleType.NVarChar).Value = dwData["CODEKPREIS"].ToString(); 
          or1.Parameters.Add("CODEKPREISA", OracleType.NVarChar).Value = dwData["CODEKPREISA"].ToString(); 
          or1.Parameters.Add("CODKALKZW", OracleType.NVarChar).Value = dwData["CODKALKZW"].ToString(); 
          or1.Parameters.Add("CODKALKVS", OracleType.NVarChar).Value = dwData["CODKALKVS"].ToString(); 
          or1.Parameters.Add("CODSPALTE2", OracleType.NVarChar).Value = dwData["CODSPALTE2"].ToString(); 
          or1.Parameters.Add("CODSPALTE3", OracleType.NVarChar).Value = dwData["CODSPALTE3"].ToString(); 
          or1.Parameters.Add("CODSPALTE4", OracleType.NVarChar).Value = dwData["CODSPALTE4"].ToString(); 
          or1.Parameters.Add("CODMINMO", OracleType.NVarChar).Value = dwData["CODMINMO"].ToString(); 
          or1.Parameters.Add("CODFRBKZ", OracleType.NVarChar).Value = dwData["CODFRBKZ"].ToString(); 
          or1.Parameters.Add("CODAMKZ", OracleType.NVarChar).Value = dwData["CODAMKZ"].ToString(); 
          or1.Parameters.Add("CODAUFWKZ", OracleType.NVarChar).Value = dwData["CODAUFWKZ"].ToString(); 
          or1.Parameters.Add("CODKUMUKZ", OracleType.NVarChar).Value = dwData["CODKUMUKZ"].ToString(); 
          or1.Parameters.Add("CODHKKZ", OracleType.NVarChar).Value = dwData["CODHKKZ"].ToString(); 
          or1.Parameters.Add("CODTWKZ", OracleType.NVarChar).Value = dwData["CODTWKZ"].ToString(); 
          or1.Parameters.Add("CODNTOKZ", OracleType.NVarChar).Value = dwData["CODNTOKZ"].ToString(); 
          or1.Parameters.Add("CODCOMMENT1", OracleType.NVarChar).Value = dwData["CODCOMMENT1"].ToString(); 
          or1.Parameters.Add("CODCOMMENT2", OracleType.NVarChar).Value = dwData["CODCOMMENT2"].ToString(); 
          or1.Parameters.Add("CODFILLER", OracleType.NVarChar).Value = dwData["CODFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
